import { IsNotEmpty, IsNumber, IsOptional, IsString } from 'class-validator';

export class CreateQuestionDto {
  @IsNotEmpty()
  @IsString()
  question_desc: string;

  @IsOptional()
  @IsString()
  option_1?: string;

  @IsOptional()
  @IsString()
  option_2?: string;

  @IsOptional()
  @IsString()
  option_3?: string;

  @IsOptional()
  @IsString()
  option_4?: string;

  @IsOptional()
  @IsString()
  option_5?: string;

  @IsOptional()
  @IsString()
  option_6?: string;

  @IsOptional()
  @IsNumber()
  source?: number;

  @IsOptional()
  @IsNumber()
  grade?: number;

  @IsOptional()
  @IsNumber()
  correct_option?: number;

  @IsOptional()
  @IsNumber()
  model_answer1?: number;

  @IsOptional()
  @IsNumber()
  model_answer2?: number;

  @IsOptional()
  @IsNumber()
  model_answer3?: number;

  @IsOptional()
  @IsNumber()
  model_answer4?: number;

  @IsOptional()
  @IsNumber()
  model_answer5?: number;

  @IsOptional()
  @IsString()
  model_knowledge_point1?: string;

  @IsOptional()
  @IsString()
  model_knowledge_point2?: string;

  @IsOptional()
  @IsString()
  model_knowledge_point3?: string;

  @IsOptional()
  @IsString()
  model_knowledge_point4?: string;

  @IsOptional()
  @IsString()
  model_knowledge_point5?: string;

  @IsOptional()
  @IsString()
  model_answer_explanation1?: string;

  @IsOptional()
  @IsString()
  model_answer_explanation2?: string;

  @IsOptional()
  @IsString()
  model_answer_explanation3?: string;

  @IsOptional()
  @IsString()
  model_answer_explanation4?: string;

  @IsOptional()
  @IsString()
  model_answer_explanation5?: string;

  @IsOptional()
  @IsNumber()
  max_matched_num?: number;

  @IsOptional()
  @IsNumber()
  max_matched_answer?: number;

  @IsOptional()
  @IsString()
  remark?: string;

  @IsOptional()
  @IsNumber()
  knowledge_point_id?: number;

  @IsOptional()
  @IsString()
  knowledge_point_code?: string;

  @IsOptional()
  @IsString()
  knowledge_point_label?: string;

  @IsOptional()
  @IsNumber()
  subject_id?: number;

  @IsOptional()
  @IsNumber()
  chapter_id?: number;

  @IsOptional()
  @IsNumber()
  section_id?: number;

  @IsOptional()
  @IsNumber()
  answer_type?: number;
}
